#include<iostream>
#include<string>
using namespace std;
string s;
int main()
{
	getline(cin, s);
	s.push_back(' ');
	int n = s.size();
	string ans, temp;
	int len = 0;
	int x = 0;
	for (int i = 0; i < n; i++) {
		if (s[i] >= '0' && s[i] <= '9') {
			x++;
			temp += s[i];
		}
		else {
			if (x > len) {
				len = x;
				ans = temp;
			}
			x = 0;
			temp = "";
		}
	}
	cout << ans << endl;
	return 0;
}